﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Auth/Auth.Master" AutoEventWireup="true" CodeBehind="Videos.aspx.cs" Inherits="CoastalClimbing.Auth.Videos" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <span class="thirtyWhite">
        Videos</span>
        <br />
    <br />
    <asp:Label ID="lblMessage" runat="server" ForeColor="red" />
    <br />
    <br />
    <table>
        <tr>
            <td>
                Title
            </td>
            <td>
                Embedded Link
            </td>
            <td>
                Description
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="txtTitle" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox ID="txtEmbeddedLink" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" />
            </td>
        </tr>
    </table>
    <hr />
    <asp:GridView ID="grvVideos" runat="server" AutoGenerateColumns="false" DataKeyNames="ID"
        OnRowEditing="EditRecord" OnRowUpdating="UpdateRecord" OnRowDataBound="RowDataBound"
        OnRowCancelingEdit="CancelRecord" OnRowDeleting="DeleteRecord" AutoGenerateEditButton="True"
        PageSize="10" GridLines="Both" CellPadding="4" ForeColor="#333333">
        <Columns>
            <asp:TemplateField HeaderText="ID" Visible="false">
                <ItemTemplate>
                    <asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Video">
                <ItemTemplate>
                    <asp:Literal ID="litVideo" runat="server" Text='<%# Eval("Link") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Title">
                <ItemTemplate>
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtTitle" runat="server" Text='<%# Eval("Title") %>' MaxLength="50" />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Description">
                <ItemTemplate>
                    <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtDescription" runat="server" Text='<%# Eval("Description") %>' />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("ID") %>'
                        CommandName="Delete" Text="Delete" ForeColor="Black" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#E3EAEB" />
        <EditRowStyle BackColor="#7C6F57" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#ffd80b" Font-Bold="True" ForeColor="333333" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
</asp:Content>
